/**
 * @param {number} n
 * @return {number}
 */
 var fib = function(n) {
    let first=0n,second=1n;
    if(n==0){
        return first;
    }
    if(n==1){
        return second;
    }
    let res;
    for(let i=2;i<=n;i++){
        res=first+second;
        first=second;
        second=res;
    }
    return res%1000000007n;
};
console.log(fib(45));